﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace OnlineEducation.Models.AccountViewModels
{
    public class LoginViewModel
    {
        [Required(ErrorMessage = "必填")]
        [Display(Name = "用户名")]
        [RegularExpression(@"(^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$)|^1[3456789][0-9]{9}$|(admin)", ErrorMessage = "邮箱格式不正确")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "必填")]
        [DataType(DataType.Password)]
        [Display(Name = "密码")]
        public string Password { get; set; }

        [Display(Name = "记住我?")]
        public bool RememberMe { get; set; }
    }
}
